﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="DMDotNhapHang.ascx.cs"
    Inherits="DMDotNhapHang" %>
<center>
    <asp:Panel ID="pnGroupGrid" runat="server" Width="500px">
        <asp:DataGrid Width="100%" ID="datagrid" runat="server" AutoGenerateColumns="False"
            PageSize="20" OnItemCommand="datagrid_ItemCommand" OnItemDataBound="datagrid_ItemDataBound"
            AllowPaging="True" OnPageIndexChanged="datagrid_PageIndexChanged">
            <PagerStyle Mode="NumericPages"></PagerStyle>
            <AlternatingItemStyle CssClass="DarkRow"></AlternatingItemStyle>
            <ItemStyle CssClass="LightRow"></ItemStyle>
            <HeaderStyle Font-Bold="True" CssClass="HeaderRow"></HeaderStyle>
            <Columns>
                <asp:BoundColumn DataField="id" HeaderText="Mã"></asp:BoundColumn>
                <asp:BoundColumn DataField="TenDot" HeaderText="Tên đợt">
                    <ItemStyle HorizontalAlign="Left" />
                </asp:BoundColumn>
                 <asp:BoundColumn DataField="Ngay" HeaderText="Ngày">
                    <ItemStyle HorizontalAlign="Left" />
                </asp:BoundColumn>
                <asp:BoundColumn DataField="GhiChu" HeaderText="Ghi chú">
                    <ItemStyle HorizontalAlign="Left" />
                </asp:BoundColumn>
                <asp:TemplateColumn>
                    <ItemStyle HorizontalAlign="Center"></ItemStyle>
                    <ItemTemplate>
                        <asp:Button CausesValidation="False" ID="cmdEdit" runat="server" Text="Sửa" Width="40"
                            CommandName="cmdEdit"></asp:Button>
                    </ItemTemplate>
                </asp:TemplateColumn>
                <asp:TemplateColumn>
                    <ItemStyle HorizontalAlign="Center"></ItemStyle>
                    <ItemTemplate>
                        <asp:Button CausesValidation="False" ID="cmdDelete" runat="server" Text="Xóa" Width="40"
                            CommandName="cmdDelete"></asp:Button>
                    </ItemTemplate>
                </asp:TemplateColumn>
            </Columns>
        </asp:DataGrid>
        <asp:SqlDataSource ID="ds" runat="server" ConnectionString="<%$ ConnectionStrings:DBConnectionString %>"
            ProviderName="<%$ ConnectionStrings:DBConnectionString.ProviderName %>"></asp:SqlDataSource>
        <asp:Button ID="cmdAddNew" runat="server" Text="Thêm mới" OnClick="cmdAddNew_Click">
        </asp:Button>
    </asp:Panel>
    <asp:Panel ID="pnEdit" runat="server" Width="500px">
        <table class="Area" style="border-right: gray 1px solid; border-top: gray 1px solid;
            border-left: gray 1px solid; border-bottom: gray 1px solid" cellspacing="5" cellpadding="0"
            width="500" border="0">
            <tr>
                <td style="color: blue" align="center" colspan="3">
                    <asp:Label ID="Label1" runat="server"></asp:Label>
                </td>
            </tr>
            <tr style="display:none;">
                <td width="10">
                </td>
                <td class="SubHead">
                    Mã đợt
                </td>
                <td>
                    <asp:TextBox ID="txtID" Width="200px" runat="server" Enabled="False"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td width="10">
                </td>
                <td class="SubHead">
                    Tên đợt nhập
                </td>
                <td>
                    <asp:TextBox ID="txtTenDot" Width="200px" runat="server"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td width="10">
                </td>
                <td class="SubHead">
                    Ngày nhập
                </td>
                <td>
                    <input onkeypress="" type="text" runat="server" id="txtNgay"
                                onfocus="showCalendarControl(this);" />
                </td>
            </tr>
            <tr>
                <td width="10">
                </td>
                <td class="SubHead">
                    Ghi chú
                </td>
                <td>
                    <asp:TextBox ID="txtGhiChu" Width="200px" runat="server"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td style="color: red; font-family: arial" align="center" colspan="3" height="10">
                    <asp:Label ID="lblError" runat="server"></asp:Label><asp:Label ID="lblUpdateStatus"
                        runat="server"></asp:Label>
                </td>
            </tr>
            <tr>
                <td align="center" colspan="3">
                    <asp:Button ID="cmdUpdate" Width="72px" Text="Cập nhật" runat="server" CausesValidation="true"
                        OnClick="cmdUpdate_Click"></asp:Button>
                    <asp:Button ID="cmdCancel" Width="72" Text="Quay lại" runat="server" CausesValidation="False"
                        OnClick="cmdCancel_Click"></asp:Button>
                </td>
            </tr>
        </table>
    </asp:Panel>
</center>
